<h1><?php echo henc(Yii::t('site','Change Personal Settings')); ?></h1>

<?php
$this->breadcrumbs=array(
    Yii::t('site','Settings') => array('site/settings'),
    Yii::t('site','Company Data')
);
?>

<div class="wide form">

<?php $form=$this->beginWidget('CActiveForm', array(
    'id'=>'user-form',
    'enableAjaxValidation'=>false,
)); ?>

    <p class="note"><?php echo Yii::t('site','Fields with {marker} are required.',array('{marker}'=>'<span class="required">*</span>')); ?></p>

    <?php echo $form->errorSummary($model); ?>

    <div class="row">
        <?php echo $form->labelEx($model,'lastName'); ?>
        <?php echo $form->textField($model,'lastName',array('size'=>60,'maxlength'=>128)); ?>
        <?php echo $form->error($model,'lastName'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model,'firstName'); ?>
        <?php echo $form->textField($model,'firstName',array('size'=>60,'maxlength'=>128)); ?>
        <?php echo $form->error($model,'firstName'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model,'email'); ?>
        <?php echo $form->textField($model,'email',array('size'=>60,'maxlength'=>128)); ?>
        <?php echo $form->error($model,'email'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model,'birthDate'); ?>
        <?php echo $form->textField($model,'birthDate',array('size'=>10,'maxlength'=>10,'class'=>'centered')); ?>
        <?php echo CHtml::image(
            "images/icons/calendar2.jpg","calendar",
            array("id"=>"birthDateButton","class"=>"pointer")); ?>
        <?php $this->widget('application.extensions.calendar.SCalendar',
            array(
                'inputField'    => 'User_birthDate',
                'button'        => 'birthDateButton',
                'skin'          => 'tiger',
                'firstDay'      => 1,
                'ifFormat'      => Yii::t('site','%Y-%m-%d'),
                'language'      => getLanguagePart(0)
            ));
            ?>
        <?php echo $form->error($model,'birthDate'); ?>
    </div>

    <div class="row buttons">
        <?php $this->widget( 'application.extensions.button.DDButton',
            array(
                'title'=>Yii::t('site','Save'),
                'linkTitle'=>Yii::t('site','Save your personal data'),
                'formID' => 'user-form',
                'buttonType' => 'save'
        )); ?>
        <?php $this->widget( 'application.extensions.button.DDButton',
            array(
                'title'=>Yii::t('site','Reset'),
                'linkTitle'=>Yii::t('site','Reset the form data'),
                'formID' => 'user-form',
                'buttonType' => 'reset',
                'confirm' => Yii::t('site','Really reset this form?')
        )); ?>
        <?php $this->widget( 'application.extensions.button.DDButton',
            array(
                'title'=>Yii::t('site','Cancel'),
                'linkTitle'=>Yii::t('site','Cancel editing, back to settings page'),
                'formID' => 'user-form',
                'buttonType' => 'cancel',
                'confirm' => Yii::t('site','Really cancel editing this item?'),
                'url' => array('/site/settings')
        )); ?>
    </div>

<?php $this->endWidget(); ?>

</div><!-- form -->
